<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>新增项目</title>
    {% load static %}
    <link rel="stylesheet" href="{% static '/css/layui.css' %}">
    <script src="{% static '/js/layui.js' %}"></script>
</head>

<body>
<form class="layui-form" action="{%url 'TestPlatform_User:addDepartment'%}" method="POST">
    {%csrf_token%}
    <div class="layui-form-item" style="margin-top: 30px;">
        <label class="layui-form-label">项目编号</label>
        <div class="layui-input-inline">
            <input type="text" name="pj_id" lay-verify="required" placeholder="请输入项目编号" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 30px;">
        <label class="layui-form-label">项目名称</label>
        <div class="layui-input-inline">
            <input type="text" name="pj_name" lay-verify="required" placeholder="请输入项目名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 30px;">
        <label class="layui-form-label">项目经理</label>
        <div class="layui-input-inline">
            <input type="text" width="auto" name="pj_pname" lay-verify="required" placeholder="请输入项目经理名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 30px;">
        <label class="layui-form-label">产品经理</label>
        <div class="layui-input-inline">
            <input type="text" width="auto" name="pj_pn" lay-verify="required" placeholder="请输入产品经理名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 30px;">
        <label class="layui-form-label">测试人员</label>
        <div class="layui-input-inline">
            <input type="text" name="pj_tname" lay-verify="required" placeholder="请输入测试人员名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 30px;">
        <label class="layui-form-label">项目状态</label>
        <div class="layui-input-block">
            <input type="radio" name="pj_state" value="未开始" title="未开始" checked="">
            <input type="radio" name="pj_state" value="进行中" title="进行中">
            <input type="radio" name="pj_state" value="已结束" title="已结束">
        </div>
    </div>
    <div class="layui-form-item" style="padding-top: 20px; ">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1" onclick="closeSelf()">
                立即提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary">重 置</button>
        </div>
    </div>
</form>
<!--{% load static %}-->
<!--<script src="{% static '/js/layui.js' %}" charset="utf-8"></script>-->
<script type="text/javascript">
    layui.use('form', function () {
        var form = layui.form;
        //刷新界面 所有元素
        form.render();
    });

    function closeSelf() {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
        window.parent.location.reload();
    }

</script>
</body>
</html>